package test04.sync.test08.t1;

/**
 * @Author lzp
 * @Date 2024-03-22
 */
public class Boy extends Thread{

    private String name;

    private LanZi lanZi;

    public Boy(String name,LanZi lanZi){
        this.name = name;
        this.lanZi = lanZi;
    }

    @Override
    public void run() {
        while (true){
            lanZi.zhai(name,new Fruit());
        }
    }
}
